package com.atguigu.springcloud.alibaba.controller.service.impl;

import com.atguigu.springcloud.alibaba.controller.service.Motor;
import com.atguigu.springcloud.alibaba.controller.service.OpticalMotor;

/**
 * @Author: Fanw
 * @Date: 2021/4/18 14:05
 * @Description:
 */
public class OpticalAdapter implements Motor {
    private OpticalMotor omotor;

    public OpticalAdapter() {
        omotor = new OpticalMotor();
    }

    public OpticalAdapter(OpticalMotor omotor) {
        this.omotor = omotor;
    }

    @Override
    public void drive() {
        omotor.opticalDrive();
    }
}
